package com.baizhi;

import java.util.Map;

public class Cart {
    private Map<Integer,CartItem> buyMap;//购买商品的集合   CartItem属性为页面想要展示的内容信息
    private Map<Integer,CartItem> removeMap;//删除商品的集合
    private double totalMoney;//总金额
    private double saveMoney;//节省的钱

    public Map<Integer, CartItem> getBuyMap() {
        return buyMap;
    }

    public void setBuyMap(Map<Integer, CartItem> buyMap) {
        this.buyMap = buyMap;
    }

    public Map<Integer, CartItem> getRemoveMap() {
        return removeMap;
    }

    public void setRemoveMap(Map<Integer, CartItem> removeMap) {
        this.removeMap = removeMap;
    }


    public double getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(double totalMoney) {
        this.totalMoney = totalMoney;
    }

    public double getSaveMoney() {
        return saveMoney;
    }

    public void setSaveMoney(double saveMoney) {
        this.saveMoney = saveMoney;
    }

    public void setSaveMoney(int saveMoney) {
        this.saveMoney = saveMoney;
    }

    public Cart(Map<Integer, CartItem> buyMap, Map<Integer, CartItem> removeMap, double totalMoney, double saveMoney) {
        this.buyMap = buyMap;
        this.removeMap = removeMap;
        this.totalMoney = totalMoney;
        this.saveMoney = saveMoney;
    }

    public Cart(Map<Integer, CartItem> removeMap, double totalMoney, double saveMoney) {
        this.removeMap = removeMap;
        this.totalMoney = totalMoney;
        this.saveMoney = saveMoney;
    }

    public Cart() {
    }

    @Override
    public String toString() {
        return "Cart{" +
                "buyMap=" + buyMap +
                ", removeMap=" + removeMap +
                ", totalMoney=" + totalMoney +
                ", saveMoney=" + saveMoney +
                '}';
    }
}
